package com.block.datapush.service.apipush.utils;

import cn.hutool.core.util.StrUtil;
import com.block.common.enums.BaseTypeInfoEnum;
import org.apache.commons.lang3.StringUtils;

public class QianHaiMingTouUtil {

    public static String getCusTypeStr(String house,String car) {
        StringBuilder stringBuilder = new StringBuilder();
        String s = stringBuilder.append(BaseTypeInfoEnum.House.getNameByValue(house)).append("、").append(BaseTypeInfoEnum.Car.getNameByValue(car)).toString();
        return s;
    }

    public static String getRemark(String sesameSeeds,String gjj,String socialSecurity) {
        StringBuilder stringBuilder = new StringBuilder();
        String s = stringBuilder.append(BaseTypeInfoEnum.Zhima.getNameByValue(sesameSeeds)).append("、").append(BaseTypeInfoEnum.Gjj.getNameByValue(gjj)).append("、").append(BaseTypeInfoEnum.Shebao.getNameByValue(socialSecurity)).toString();
        return s;
    }


    public static String getloan(String loan) {
        if (StrUtil.equals(loan, BaseTypeInfoEnum.LoanAmount.la001.getValue())){
            return "30000";
        } else if (StrUtil.equals(loan, BaseTypeInfoEnum.LoanAmount.la002.getValue())){
            return "50000";
        } else  if (StrUtil.equals(loan, BaseTypeInfoEnum.LoanAmount.la003.getValue())){
            return "100000";
        } else if (StrUtil.equals(loan, BaseTypeInfoEnum.LoanAmount.la004.getValue())){
            return "200000";
        }
        return "300000";
    }

    public static String getReqIp(String reqIp) {
        if (StringUtils.isNotEmpty(reqIp)){
            return reqIp;
        }
        return "127.0.0.1";
    }

    public static String getSex(Integer sex) {
        if (sex == 1){
            return "男";
        }
        return "女";
    }

}
